﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace HolisticWare.VoIP.Getafisk.EXE_01PL_05netfx30.SL30.any_any_any
{
	public static class Navigation
	{
		public 
			static 
			void 
			LoadPage<T>
			(
				T xaml
			)
			where T : UserControl
		{
			string t = typeof(T).FullName;
			object o = Application.Current.GetType().Assembly.CreateInstance(t);
			UserControl uc = o as UserControl;
 
			if (uc != null)
			{
				Control root = (Control)Application.Current.RootVisual;
				Panel contentHolder = (Panel)root.FindName("ContentHolder");
				contentHolder.Children.Clear();
				contentHolder.Children.Add(uc);
			}
		}
	}
}
